<template>
  <div class="value-page">
    <!-- 项目基本信息 -->
    <table  cellspacing="1" cellpadding="0">
      <tr>
        <td class="label">项目编号</td>
        <td>{{ projectAuditInfo.projectBuild.projectNo }}</td>
        <td class="label">项目名称</td>
        <td>{{ projectAuditInfo.projectBuild.projectName }}</td>
      </tr>
      <tr>
        <td class="label">项目类型</td>
        <td>{{ projectAuditInfo.projectBuild.subName }}</td>
        <td class="label">项目实施地点</td>
        <td>{{ projectAuditInfo.projectBuild.implementPlace }}</td>
      </tr>
      <tr>
        <td class="label">项目承担公司</td>
        <td>{{ projectAuditInfo.projectBuild.factoryName }}</td>
        <td class="label">拟定项目经理</td>
        <td>{{ projectAuditInfo.projectManager }}</td>
      </tr>
      <tr>
        <td class="label">立项理由或依据</td>
        <td colspan="3">{{ projectAuditInfo.projectBuildManage.applyReason }}</td>
      </tr>
      <tr>
        <td class="label">项目实施后效益及影响说明</td>
        <td colspan="3">{{ projectAuditInfo.projectBuildManage.implementationAfterProfit }}</td>
      </tr>
      <tr>
        <td class="label">{{ budgetList[0].budgetItemName}}</td>
        <td>{{ budgetList[0].budgetItem }}</td>
        <td class="label">{{ budgetList[1].budgetItemName}}</td>
        <td>{{ budgetList[1].budgetItem }}</td>
      </tr>
      <tr>
        <td class="label">{{ budgetList[2].budgetItemName}}</td>
        <td>{{ budgetList[2].budgetItem }}</td>
        <td class="label">{{ budgetList[3].budgetItemName}}</td>
        <td>{{ budgetList[3].budgetItem }}</td>
      </tr>
      </table>
    <!-- <a-descriptions bordered :column="2" size="small" class="col-span-2">
      <a-descriptions-item label="项目编号">
        {{ projectAuditInfo.projectBuild.projectNo }}
      </a-descriptions-item>
      <a-descriptions-item label="项目名称">
        {{ projectAuditInfo.projectBuild.projectName }}
      </a-descriptions-item>
      <a-descriptions-item label="项目类型">
        {{ projectAuditInfo.projectBuild.subName }}
      </a-descriptions-item>
      <a-descriptions-item label="项目实施地点">
        {{ projectAuditInfo.projectBuild.implementPlace }}
      </a-descriptions-item>
      <a-descriptions-item label="项目承担公司">{{
        projectAuditInfo.projectBuild.factoryName
      }}</a-descriptions-item>
      <a-descriptions-item label="拟定项目经理">
        {{ projectAuditInfo.projectManager }}
      </a-descriptions-item>
    </a-descriptions>
    <a-descriptions bordered :column="1" size="small">
      <a-descriptions-item label="立项理由或依据">
        {{ projectAuditInfo.projectBuildManage.applyReason }}
      </a-descriptions-item>
      <a-descriptions-item label="项目实施后效益及影响说明">
        {{ projectAuditInfo.projectBuildManage.implementationAfterProfit }}
      </a-descriptions-item>
    </a-descriptions>
    <a-descriptions bordered :column="2" size="small" class="col-span-2" v-if="budgetList.length > 0">
      <a-descriptions-item :label="item.budgetItemName" v-for="(item, index) of budgetList" :key="index"
        >{{ item.budgetItem }}
      </a-descriptions-item>
    </a-descriptions> -->
  </div>
</template>

<script>
import { getAction, postAction } from '@/api/manage'
import { getParamValFromUrl, caseToShow } from '@/utils/common.js'
export default {
  name: 'ProjectBuildBasicMC',
  components: {},
  data() {
    return {
      requrl: {
        codeInfoList: '/manage/codeInfo/list',
      },
      budgetList: [],
    }
  },
  mounted() {
    this.initBudget()
  },
  props: {
    projectAuditInfo: {
      Type: Object,
      default: '',
    },
  },
  methods: {
    initBudget() {
      getAction('/projectBuildAudit/getBudgetMsgById', { id: this.projectAuditInfo.projectBuild.id }).then((res) => {
        let arr = res.result || []
        this.budgetList = []
        arr.forEach((item) => {
          let obj = {
            budgetItemName: '总投入金额（不含税）',
            budgetItem: item.projectBudgetAmount,
          }
          this.budgetList.push(obj)
          let obj1 = {
            budgetItemName: '投入成本归属',
            budgetItem: item.projectBudgetFactory,
          }
          this.budgetList.push(obj1)
          let obj2 = {
            budgetItemName: '咨询服务费',
            budgetItem: item.budgetItem10,
          }
          this.budgetList.push(obj2)
          let obj3 = {
            budgetItemName: '其他费用',
            budgetItem: item.budgetItem20,
          }
          this.budgetList.push(obj3)
        })
      })
    },
    caseToShow(obj) {
      return caseToShow(obj)
    },
  },
}
</script>
<style lang="less" scoped>
/deep/.ant-checkbox-disabled + span {
  color: black;
}
.project-info {
  color: black;
  .info-detail {
    background-color: #fff;
    border: 1px solid #ebebeb;
    padding: 1% 2.5%;
    margin-bottom: 15px;
    position: relative;
    font-size: 16px;
    > span {
      display: inline-block;
      margin-left: 15px;
    }
    .list-title {
      font-weight: 900;
      height: unset;
      line-height: 28px;
    }
    .row-content {
      display: flex;
      align-items: baseline;
      > span {
        white-space: normal;
      }
    }
    .info-list {
      padding: unset;
      display: flex;
      flex-wrap: wrap;
      margin-bottom: 0;
      > li {
        width: 33.33%;
        padding: 3px 0;
        height: auto;
        display: flex;
        align-items: center;
        // >img{
        //   margin-right: 5px;
        // }
        .comment {
          white-space: pre-wrap;
        }
        span {
          // line-height: 1.2;
        }
      }
      .left {
        display: flex;
        align-items: baseline;
      }
      .one-row {
        width: 100%;
        align-items: baseline;
        height: auto;
        padding: 3px 0px;
        > span {
          width: calc(100% - 170px);
        }
      }
    }
    .info-content {
      .content-title {
        display: flex;
        align-items: center;
        font-weight: 900;
        img {
          margin-right: 5px;
        }
      }
      .content-box {
        padding: 5px 16px 0;
      }
    }
  }
}
table{
  border: 1px solid black;
  background-color: black;
}
table td {
  padding: 5px 16px;
  border: 1px solid black;
  background-color: white;
}
table .label{
  width:20%;
  font-weight:bold;
  text-align: center;
  background-color: #f0f8ff
}
</style>